]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Disable preview overlays unless fully zoomed out
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 26 Jun 2020 15:06:38 +0000 (17:06 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 6 Jul 2020 22:06:53 +0000 (00:06 +0200)
The overlays are only meant to be shown when the workspace is fully
zoomed out, not when using the floating layout or some in-between state.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345

js/ui/workspace.js

index b84c45b1f09df512f0b2ad5a4385f2fad00a2919..14670d10042f2e373198c995b78baa6de004dc39 100644 (file)
@@ -416,8 +416,11 @@ var WorkspaceLayout = GObject.registerClass({
             upper: 1,
         });
 
-        this._stateAdjustment.connect('notify::value', () =>
-            this.layout_changed());
+        this._stateAdjustment.connect('notify::value', () => {
+            [...this._windows.keys()].forEach(
+                preview => this._syncOverlay(preview));
+            this.layout_changed();
+        });
     }
 
     _isBetterLayout(oldLayout, newLayout) {
@@ -632,6 +635,10 @@ var WorkspaceLayout = GObject.registerClass({
         }
     }
 
+    _syncOverlay(preview) {
+        preview.overlay_enabled = this._stateAdjustment.value === 1;
+    }
+
     /**
      * addWindow:
      * @param {WindowPreview} window: the window to add
@@ -665,6 +672,7 @@ var WorkspaceLayout = GObject.registerClass({
             return winA.get_stable_sequence() - winB.get_stable_sequence();
         });
 
+        this._syncOverlay(window);
         this._container.add_child(window);
 
         this._layout = null;